<template>
  <div class="form-group row">
    <label :for="dataId" class="col-3 col-form-label text-right">{{labelText}}</label>
    <CustomSwitch :data-id="dataId" class="mt-2" :checked="checked" @change="change" />
  </div>
</template>
<script>
import CustomSwitch from './CustomSwitch'

export default {
  name: "FormGroupSwitch",
  components:{
      CustomSwitch
  },
  model: {
    prop: "checked",
    event: "change1"
  },
  props: {
    checked: {
      default: false
    },
    dataId: {
      default: ""
    },
    labelText: {
      default: ""
    }
  },
  methods: {
    change(checked) {
      this.$emit("change1", checked);
    }
  }
};
</script>